package org.example.project3.Mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.project3.DTO.RegisterDTO;
import org.example.project3.Entity.User;

@Mapper
public interface UserMapper {

    void add(User freshUser);

    @Select("select * from user where id = #{id} and username = #{username} and password = #{password}")
    User search(RegisterDTO dto);

    @Select("select * from user where id = #{id}")
    User getUserstatistics(Integer id);

    void update(User user);
}
